package custom.metaClassTest;

import custom.MetaObjectTest.po.Order;
import org.apache.ibatis.reflection.DefaultReflectorFactory;
import org.apache.ibatis.reflection.MetaClass;



public class TestMetaClass {
	public static void main(String[] args) {
		MetaClass metaClass = MetaClass.forClass(Order.class, new DefaultReflectorFactory());
		String[] getterNames = metaClass.getGetterNames();
		for(int a=0;a<getterNames.length;a++){
			System.out.println(getterNames[a]);
		}
		// 是否有默认构造方法
		System.out.println(metaClass.hasDefaultConstructor());
		System.out.println(metaClass.hasSetter("orderNo"));
	}
}
